/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2025 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define TIM_PSC_APB1 ((APB1_TIMER_CLOCKS/PWM_FREQUENCE)/PWM_RESOLUTION -1)
#define PWM_FREQUENCE 50
#define PWM_RESOLUTION 10000
#define APB1_TIMER_CLOCKS 84000000
#define PWM_DEFAULT_DUTY 5000
#define TIM_PSC_APB2 ((APB2_TIMER_CLOCKS/PWM_FREQUENCE)/PWM_RESOLUTION -1)
#define APB2_TIMER_CLOCKS 168000000
#define portY_Pin GPIO_PIN_7
#define portY_GPIO_Port GPIOI
#define portX_Pin GPIO_PIN_6
#define portX_GPIO_Port GPIOI
#define portW_Pin GPIO_PIN_5
#define portW_GPIO_Port GPIOI
#define portZ_Pin GPIO_PIN_2
#define portZ_GPIO_Port GPIOI
#define portA_Pin GPIO_PIN_0
#define portA_GPIO_Port GPIOI
#define portB_Pin GPIO_PIN_12
#define portB_GPIO_Port GPIOH
#define portC_Pin GPIO_PIN_11
#define portC_GPIO_Port GPIOH
#define portD_Pin GPIO_PIN_10
#define portD_GPIO_Port GPIOH
#define portE_Pin GPIO_PIN_15
#define portE_GPIO_Port GPIOD
#define portF_Pin GPIO_PIN_14
#define portF_GPIO_Port GPIOD
#define portG_Pin GPIO_PIN_13
#define portG_GPIO_Port GPIOD
#define portT_Pin GPIO_PIN_1
#define portT_GPIO_Port GPIOA
#define portS_Pin GPIO_PIN_0
#define portS_GPIO_Port GPIOA
#define portH_Pin GPIO_PIN_12
#define portH_GPIO_Port GPIOD
#define portU_Pin GPIO_PIN_2
#define portU_GPIO_Port GPIOA
#define LED_RED_Pin GPIO_PIN_11
#define LED_RED_GPIO_Port GPIOE
#define portV_Pin GPIO_PIN_3
#define portV_GPIO_Port GPIOA
#define LED_GREEN_Pin GPIO_PIN_14
#define LED_GREEN_GPIO_Port GPIOF

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
